<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="./../resources/css/default.css" rel="stylesheet" type="text/css"/>
        <!--<link href="./../resources/css/cssLayout.css" rel="stylesheet" type="text/css" />-->
        <title>iGOBE</title>
        <style type="text/css">
            #bottom {
                position: fixed;
                top: 15px;
                right: 15px;
                z-index: 10;
            }
            
            body {
                margin:0px;
                
            }
            
            #formIdentification\:j_idt9 {
                z-index: 10;
                position:fixed;
                background-color:#424548;
                border:none;
                border-radius:0px;
                padding: 0px 0px 0px 10px;
                width:100%;
                height:60px;
            }
           
            #formIdentification\:j_idt12 {
                z-index: 10;
                position:fixed;
                background-color:#424548;
                border:none;
                border-radius:0px;
                padding: 0px 0px 0px 10px;
                width:100%;
                height:60px;
            }
            
            #formIdentification\:j_idt12_content {
                margin-top:10px;
                color:#F7F7F7;
                font-weight: bold;
            }
            
            #formIdentification\:j_idt12_content a {
                color:#F7F7F7;
                font-weight:bold;
                text-transform: none;
            }
            
            #formIdentification\:j_idt9 label {
                color:#F7F7F7;
                font-weight:bold;
            }
            
            #formIdentification\:j_idt9 button {
                background-color:#F7F7F7;
                background-image:none;
                color:#424548;
                border-radius:10px;
                font-weight:bold;   
            }
            
            #formIdentification\:j_idt9 button:hover {
                background-color:#424548;
                background-image:none;
                color:#F7F7F7;
                border-radius:10px;
                font-weight:bold;
            }
            
            #formIdentification\:j_idt9 input {
                background-color:#F7F7F7;
                border-radius:10px 10px 10px;
                margin:0px 15px;
            }
            
            #formIdentification\:j_idt9 input:focus {
                background-color:#CCC;
            }
            
            #content {
                padding-top:80px;
            }
        </style>
    </h:head>

    <h:body>
        <h:form id="formIdentification">
        <p:messages />
        <div id="top">
            <ui:insert name="top">
                
                    <p:panel rendered="#{!navigationBean.logged}">
                        <h:outputLabel value="#{bundle.login} " for="login"/>
                        <p:inputText id="login" value="#{navigationBean.login}"/>

                        <h:outputLabel value="#{bundle.password} " for="password"/>
                        <p:password id="password" value="#{navigationBean.password}"/>

                        <p:commandButton id="btnConnexion" value="#{bundle.identification}" 
                                         actionListener="#{navigationBean.identification()}"
                                         update="formIdentification, :form2:stack"/>
                    </p:panel> 
                
                    <p:panel rendered="#{navigationBean.logged}">
                        #{bundle.bonjour} #{navigationBean.login} !
                        <p:commandLink value="#{bundle.deconnecter}" actionListener="#{navigationBean.deconnecter()}"
                                       update="formIdentification, :form2:stack"/>
                    </p:panel>
            </ui:insert>
        </div>
        </h:form>

        <div id="content" class="center_content">
            <ui:insert name="content">Content</ui:insert>
        </div>

        <div id="bottom">
            <ui:insert name="bottom">

                <h:form id="form2">
                    <table cellspacing="10">
                        <tr>
                            <td>
                                <h:commandLink  action="#{regionLocale.activerLangue('fr')}" immediate="true">
                                    <h:graphicImage value="resources/css/images/france.png" alt="français" style="border: 0px"/>
                                </h:commandLink>
                            </td>
                            <td>
                                <h:commandLink action="#{regionLocale.activerLangue('en')}" immediate="true">
                                    <h:graphicImage value="resources/css/images/angleterre.png" alt="anglais" style="border: 0px"/>
                                </h:commandLink>
                            </td>

                        </tr>
                    </table>
            <p:stack id="stack" icon="resources/stack.png">
                <p:menuitem value="Utilisateur" icon="resources/user_icon.png" url="creerUser.xhtml"/>  
                <p:menuitem value="3D" icon="resources/glasses_icon.png" url="/test3d/"/>  
                <p:menuitem value="Contenu" icon="resources/add_doc_icon.png" url="addContent.xhtml?nodeId=#{mindMapManagedBean.id}"
                            rendered="#{navigationBean.logged}"/>  
            </p:stack>
                </h:form>
            </ui:insert>
        </div>

    </h:body>

</html>
